﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Microsoft.Forums.SyncService
{
    /// <summary>
    /// Contains the results of a Forum Synchronization
    /// </summary>
    public class SynchronizeForumSummary : ISynchronizeSummary
    {
        /// <summary>
        /// Id of the forum which was synchronized
        /// </summary>
        public Guid ForumId
        {
            get;
            private set;
        }

        /// <summary>
        /// Collection of thread summaries which contains
        /// info about what thread and posts were updated or added
        /// </summary>
        public IList<SynchronizeThreadSummary> ThreadSummaries
        {
            get;
            private set;
        }

        /// <summary>
        /// Gets or sets the type of the synchronize.
        /// </summary>
        /// <value>The type of the synchronize.</value>
        public SynchronizeType SynchronizeType
        {
            get
            {
                return SynchronizeType.Update;
            }
        }

        /// <summary>
        /// Creates a summary object for the synchronization of a forum
        /// </summary>
        /// <param name="forumId">Id of Forum which was synchronized</param>
        public SynchronizeForumSummary(Guid forumId, IList<SynchronizeThreadSummary> threadSummaries)
        {
            ForumId = forumId;
            ThreadSummaries = threadSummaries;
        }

    }
}
